/*********************************************************************************************************
 *  ------------------------------------------------------------------------------------------------------
 *  file description
 *  ------------------------------------------------------------------------------------------------------
 *         \file  map_cfg.h
 *        \brief  This is a general-purpose C language map module configuration file
 *       \author  Lamdonn
 *        \email  Lamdonn@163.com
 *      \version  1.1.0
 *      \license  GPL2
 *    \copyright  Copyright (C) 2023 Lamdonn.
 ********************************************************************************************************/
#ifndef __map_cfg_H
#define __map_cfg_H

/* string type define */
typedef char* string;

/* key tpye define */
#define MAP_KEY_TYPE_ENTITY             (0)
#define MAP_KEY_TYPE_POINTER            (1)

/* macro type */
#define MK_TYPE(type)                   MAP_KEY_TYPE__##type
#define MK_TRANS(type)                  map_key_trans__##type

/* key type */
#define MAP_KEY_TYPE__int               MAP_KEY_TYPE_ENTITY
#define MAP_KEY_TYPE__char              MAP_KEY_TYPE_ENTITY
#define MAP_KEY_TYPE__short             MAP_KEY_TYPE_ENTITY
#define MAP_KEY_TYPE__long              MAP_KEY_TYPE_ENTITY
#define MAP_KEY_TYPE__string            MAP_KEY_TYPE_POINTER
#define MAP_KEY_TYPE__float             MAP_KEY_TYPE_ENTITY
#define MAP_KEY_TYPE__double            MAP_KEY_TYPE_ENTITY

/* key transform function declare */
void* map_key_trans__int(void* map, int key);
void* map_key_trans__char(void* map, char key);
void* map_key_trans__short(void* map, short key);
void* map_key_trans__long(void* map, long key);
void* map_key_trans__string(void* map, string key);
void* map_key_trans__float(void* map, float key);
void* map_key_trans__double(void* map, double key);

/*********************************************************************************************************
 * add other key type transform function declare here
 ********************************************************************************************************/


#endif
